<?php

iconv_set_encoding("internal_encoding", "UTF-8");
date_default_timezone_set('PRC');
class Log {

	public static function logger($message)
	{
		$file_name = self::getFileName();
		try {
			$file_handle = fopen($file_name, 'a+');
			fwrite($file_handle, date('H:i:s', time()) . ":" . $message . "\r\n");
		} catch (Exception $e) {
			echo 'log faile';			
		}
	}

	private static function getFileName()
	{
		return 'c:/program files/php/myLog/log_' . date('Ymd', time()) . '.txt'; 
	}
}

?>